from django.urls import path

from learning import views

app_name = "learning"

urlpatterns = [
    path("", views.HomePageView.as_view(), name="home"),
    path("mistakes/", views.MistakeListView.as_view(), name="mistake_list"),
    path("mistakes/new/", views.MistakeCreateView.as_view(), name="mistake_create"),
    path("mistakes/<int:pk>/", views.MistakeDetailView.as_view(), name="mistake_detail"),
    path("mistakes/<int:pk>/submit/", views.MistakeSubmitView.as_view(), name="mistake_submit"),
    path("mistakes/<int:pk>/resolve/", views.MistakeResolveView.as_view(), name="mistake_resolve"),
    path("mistakes/<int:pk>/archive/", views.MistakeArchiveView.as_view(), name="mistake_archive"),
    path("mistakes/<int:pk>/restore/", views.MistakeRestoreView.as_view(), name="mistake_restore"),
    path("mistakes/<int:pk>/delete/", views.MistakeDeleteView.as_view(), name="mistake_delete"),
    path("mistakes/<int:pk>/ask-llm/", views.MistakeAskLLMView.as_view(), name="mistake_ask_llm"),
    path(
        "mistakes/<int:pk>/ask-llm/messages/",
        views.MistakeGetMessagesView.as_view(),
        name="mistake_get_messages",
    ),
    path(
        "mistakes/<int:pk>/ask-llm/new/",
        views.MistakeCreateConversationView.as_view(),
        name="mistake_new_llm_conversation",
    ),
    path(
        "mistakes/<int:pk>/ask-llm/reset/",
        views.MistakeResetLLMView.as_view(),
        name="mistake_reset_llm",
    ),
    path(
        "mistakes/<int:pk>/ask-llm/switch/",
        views.MistakeSwitchConversationView.as_view(),
        name="mistake_switch_llm_conversation",
    ),
    path(
        "conversations/",
        views.MistakeListConversationsView.as_view(),
        name="conversation_list",
    ),
    path("notebook/", views.NotebookListView.as_view(), name="notebook_list"),
    path("notebook/new/", views.NotebookCreateView.as_view(), name="notebook_create"),
    path("notebook/public/", views.NotebookPublicListView.as_view(), name="notebook_public"),
    path("notebook/<int:pk>/", views.NotebookDetailView.as_view(), name="notebook_detail"),
    path("notebook/<int:pk>/edit/", views.NotebookUpdateView.as_view(), name="notebook_edit"),
    path("notebook/<int:pk>/submit/", views.NotebookSubmitView.as_view(), name="notebook_submit"),
    path("notebook/<int:pk>/withdraw/", views.NotebookWithdrawView.as_view(), name="notebook_withdraw"),
    path("notebook/<int:pk>/publish/", views.NotebookPublishView.as_view(), name="notebook_publish"),
    path("notebook/<int:pk>/reject/", views.NotebookRejectView.as_view(), name="notebook_reject"),
    # 专题训练
    path("topic-training/", views.TopicTrainingListView.as_view(), name="topic_training_list"),
    path("topic-training/<int:pk>/start/", views.TopicTrainingStartView.as_view(), name="topic_training_start"),
    path("topic-training/<int:pk>/question/", views.TopicTrainingQuestionView.as_view(), name="topic_training_question"),
    path("topic-training/<int:pk>/submit-answer/", views.TopicTrainingSubmitAnswerView.as_view(), name="topic_training_submit_answer"),
    path("topic-training/<int:pk>/next-question/", views.TopicTrainingNextQuestionView.as_view(), name="topic_training_next_question"),
]
